#include "stdafx.h"
//#include "Map.h"
#include "PlayerBase.h"

PlayerBase::PlayerBase(PlayerId stPlayerId)
{
	m_stPlayerId = stPlayerId;
	m_strRemoteIp = "";
	m_nAccountType = 0;
	m_strAccountName = "";
	m_nCharId = 0;
	m_nRace = 0;
	m_nGender = 0;
	m_strCharName = "";
	m_nIngot = 0;
	m_nMoney = 0;
	//m_nHonour = 0;
	m_nLevel = 0;
	m_nValue = 0;
	m_nImageId = 0;
	m_nMapId = 0;
	m_nMapX = 0;
	m_nMapY = 0;
	m_stMapId = MapId();
	m_nBattleId = 0;
	m_nBattlerId = 0;
	m_bLoaded = false;
	m_nWatchBattleId = 0;

	LOGGER_INFO("PlayerBase,pPlayer:%p,nSocketId:%d,nSocketIdOnGate:%d",this,m_stPlayerId.nSocketId,m_stPlayerId.nSocketIdOnGate);
}
PlayerBase::~PlayerBase()
{
	
	LOGGER_INFO("~PlayerBase,pPlayer:%p,nSocketId:%d,nSocketIdOnGate:%d",this,m_stPlayerId.nSocketId,m_stPlayerId.nSocketIdOnGate);
}

void PlayerBase::SendPacketToPlayer(PacketEncoder& encoder)
{
	SendPacket(m_stPlayerId.nSocketId,m_stPlayerId.nSocketIdOnGate,encoder);
}